package org.niu.listnode;

public class DeleteDuplicate {
    public boolean areNumbersAscending(String s) {
        String[] s1 = s.split(" ");
        int tem = -1;
        for (String s2 : s1) {
            for (int i = 0; i < s2.length(); i++) {
                if(s2.charAt(i) >= '0' && s2.charAt(i) <= '9'){
                    if(i == s2.length()-1){
                        int s2Int = Integer.parseInt(s2);
                        if(s2Int <= tem){
                            return false;
                        }else{
                            tem = s2Int;
                        }
                    }
                    continue;
                }
                else if(s2.charAt(i) <= '0' && s2.charAt(i) >= '9'){
                    break;
                }
            }
        }
        return true;
    }
}
